package org.lex.keytool.core.task;

import org.lex.keytool.core.Args;
import org.lex.keytool.core.Constants;

public class ImportCertificateTask extends Task {
	private String alias = null;
	private String file = null;
	private String keyPassword = null;
	private String storeType = null;
	private String keyStore = null;
	private String storePassword = null;
	private Boolean trustcacerts = null;

	public String[] buildArguments() {
		Args args = new Args();
		args.add(Constants.importcert);

		args.add(Constants.alias, alias);
		args.add(Constants.file, file);
		args.add(Constants.keypass, keyPassword);
		args.add(Constants.storetype, storeType);
		args.add(Constants.keystore, keyStore);
		args.add(Constants.storepass, storePassword);
		if (Boolean.TRUE == trustcacerts) {
			args.add(Constants.trustcacerts);
		}
		args.add(Constants.noprompt);
		return args.build();
	}

	public String getKeyPassword() {
		return keyPassword;
	}

	public void setKeyPassword(String keyPassword) {
		this.keyPassword = keyPassword;
	}

	public Boolean getTrustcacerts() {
		return trustcacerts;
	}

	public void setTrustcacerts(Boolean trustcacerts) {
		this.trustcacerts = trustcacerts;
	}

	public String getAlias() {
		return alias;
	}

	public void setAlias(String alias) {
		this.alias = alias;
	}

	public String getFile() {
		return file;
	}

	public void setFile(String file) {
		this.file = file;
	}

	public String getStoreType() {
		return storeType;
	}

	public void setStoreType(String storeType) {
		this.storeType = storeType;
	}

	public String getKeyStore() {
		return keyStore;
	}

	public void setKeyStore(String keyStore) {
		this.keyStore = keyStore;
	}

	public String getStorePassword() {
		return storePassword;
	}

	public void setStorePassword(String storePassword) {
		this.storePassword = storePassword;
	}
}
